<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta http-equiv="Cache-Control"  content="no-transform">
    <meta http-equiv="content-type" content="text/html; charset=utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
    <title>订单确定</title>
    <link href="/statics/bootstrap/css/bootstrap.min.css" rel="stylesheet" type="text/css" />
    <link href="/statics/view/css/all.css" rel="stylesheet" type="text/css" />
    <style type="text/css">
        body{
            background: #ffffff;
        }
    </style>
</head>
<body>
[#include "/common/header.ftl" /]

<div class="alert alert-success" role="alert">
    <h3>订单确认</h3>
    <p>请确认信息并完成支付</p>
</div>
<div class="container" style="padding-bottom: 50px;">
    <p>你的订单编号:${order.sn}已经成功创建,订单金额:${order.amount}元</p>
    <p>请在30分钟内完成支付</p>
    <p>马上支付</p>
    <div class="list-group">
        <a class="list-group-item active" href="javascript:void(0);" onclick="getSubmit();">话费购支付</a>
        <form id="doaiAppPayFrom"  action="" method="post">
            <input type="hidden" id="inp_da" name="requestPacket">
            <input type="hidden" id="inp_a" name="loginName">
        </form>
    </div>
</div>
<div class="container si-nav-tools">
    <div class="row">
        <div class="col-sm-3 col-xs-3 div-right">
            <a href="/">返回首页</a>
        </div>
        <div class="col-sm-3 col-xs-3 div-right">
            <a href="/member/order/list">查看订单</a>
        </div>
    </div>
</div>
<script type="text/javascript" src="/statics/jquery/jquery.js"></script>
<script type="text/javascript" src="/statics/view/js/common.js"></script>
<script type="text/javascript">

    function getSubmit(){
        var contextPath = '/payment';
        $.ajax({
            url: contextPath+"/signPayInfo?orderId=${order.id}",
            // url:contextPath+"/getPaymentSign",
            type:'POST',
            dataType:'json',
            success: function (data){
                $("#inp_da").val(data.reqSignMsg);
                $("#inp_a").val(data.pMobile);
                $("#doaiAppPayFrom").attr("action",data.hostUrl)
                $("#doaiAppPayFrom").submit();
            }
        });
    }

</script>
</body>
</html>